﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WareHose.Application.Admins.Dto;
using WareHose.Application.allots.Dto;
using WareHose.Application.breakageS.Dto;
using WareHose.Application.DePartment.DTo;
using WareHose.Application.Menus.Dto;
using WareHose.Application.Procurements.Dto;
using WareHose.Application.Roles.DTO;
using WareHose.Application.TaskStocks.DTO;
using WareHose.Application.Warehouse.Dto;
using WareHouse.Domain;
using WareHouse.Domain.Procurements;
using WareHouse.Domain.Warehouses;

namespace WareHose.Application
{
    public class WareHouseAutoMapper:Profile
    {
        public WareHouseAutoMapper()
        {
            CreateMap<AddOrUpdAdminDto, Admin>().ReverseMap();
            CreateMap<AdminDto, Admin>().ReverseMap();


            CreateMap<RoleInputDTo, Role>().ReverseMap();//就这个有问题

            CreateMap< MentDto , Department >().ReverseMap();

            CreateMap<TaskStocksDTo, Taskstock>().ReverseMap();//盘点
            CreateMap<AllotsDto, allot>().ReverseMap();//盘点
            CreateMap<breakageSDto, breakage>().ReverseMap();//盘点

            #region 仓库
            CreateMap<AddUpdWarehouseDto, Warehouse1>();
            CreateMap<Warehouse1,WarehouseDto>();
            #endregion

            #region 库位
            CreateMap<AddUpdLocationDto, Location>();
            CreateMap<Location, LocationDto>();
            #endregion

            #region 采购
            CreateMap<AddOrUpdProcurementDto, Procurement>();
            CreateMap<Procurement, ProcurementDto>();
            #endregion
        }
    }
}
